<apes-header>
  <apes-button-list class="buttonList" [ctx]="ctx" [buttonBarMetadata]="buttonBar"
                    (click)="onEvent($event)"></apes-button-list>
</apes-header>

<apes-content>
  <apes-card [apesBordered]="false">
    <!-- 查询条件(固定) -->
    <div>
      <!-- 日期 -->
      <div apes-col [apesMd]="16">
        <div style="display: flex;">
          <apes-form-item style="margin-bottom: 0">
            <apes-form-label  apes-col [apesMd]="6" apesRequired>日期</apes-form-label>
            <apes-form-control  apes-col [apesMd]="18" >
              <apes-range-picker [(ngModel)]="timeList" [apesFormat]="'yyyy-MM-dd'"></apes-range-picker>
            </apes-form-control>
          </apes-form-item>
          <div style=" margin-left: 15px">
            <button apes-button
                    [apesSize]="'default'"
                    *ngFor="let item of but"
                    (click)="_submit(item.value)">
              近{{ item.value }}天
            </button>
          </div>
        </div>
      </div>
      <!-- 供应商 -->
      <div apes-col [apesMd]="16" >
        <apes-form-item style="margin-bottom: 0">
          <apes-form-label  apes-col [apesMd]="2">供应商</apes-form-label>
          <apes-form-control  apes-col [apesMd]="8">
            <ng-select clearAllText
                       [items]="supplier"
                       bindLabel="GYSMC"
                       bindValue="GYSID"
                       [searchable]="true"
                       [placeholder]="'选填'"
                       [notFoundText]="'无法找到'"
                       typeToSearchText
                       [(ngModel)]="supplierID">
            </ng-select>
          </apes-form-control>
        </apes-form-item>
      </div>
    </div>
    <!-- 显示内容 -->
    <div apes-col [apesMd]="24">
      <div>
        <ag-grid-angular #grid
                         style="width: 100%;" [ngStyle]="{ height: height }" class="ag-theme-balham"
                         enableColResize="true"
                         enableSorting="true"
                         enableFilter="true"

                         suppressLoadingOverlay="true"
                         [modules]="modules"
                         [rowData]="rowData"
                         [gridOptions]="gridOptions"
                         [columnDefs]="columnDefs"
                         [pinnedBottomRowData]="pinnedBottomRowData"
                         [rowClassRules]="rowClassRules">
        </ag-grid-angular>
      </div>
    </div>
  </apes-card>
</apes-content>
